<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="aui-header-1 aui-gutter-column-md">
    <h2>{{'common_basic_info_label' | i18n}}</h2>
</div>
<div class="aui-gutter-column-lg">
    <resoure-base-info [source]="source" [sourceType]="dataMap.Resource_Type.vmGroup.value"></resoure-base-info>
</div>

<div class="aui-gutter-column-md" *ngIf="showResouceFilter || showResourceTagFilter">
    <div class="aui-header-1 aui-gutter-column-sm">
        <h2>{{'protection_title_rules_label' | i18n}}</h2>
    </div>
    <lv-group lvGutter="8px">
        <lv-group class="rule-card" lvGutter="8px" *ngIf="showResouceFilter">
            <div class="title">{{'protection_rule_label' | i18n:[1]}}</div>
            <div lv-overflow class="rule-wrap">{{resoureNameFilterString}}</div>
        </lv-group>
        <lv-group lvDirection='vertical' style="align-items: center;"
            *ngIf="showResouceFilter && showResourceTagFilter">
            <i lv-icon="aui-union-circle" style="width: 22px;"></i>
            <i lv-icon="aui-union-line" style="width: 70px;"></i>
        </lv-group>
        <lv-group class="rule-card" lvGutter="8px" *ngIf="showResourceTagFilter">
            <div class="title">
                {{'protection_rule_label' | i18n:[showResouceFilter && showResourceTagFilter ? 2 : 1]}}
            </div>
            <div lv-overflow class="rule-wrap">{{resourceTagFilterString}}</div>
        </lv-group>
    </lv-group>
</div>

<div class="aui-header-1 aui-gutter-column-md">
    <h2>{{'common_resource_label' | i18n}}</h2>
</div>
<div class="aui-operation">
    <lv-pro-button-group [config]="optsConfig" [bindData]="selectionData"> </lv-pro-button-group>
</div>
<lv-pro-table #dataTable [config]="tableConfig" [data]="tableData"></lv-pro-table>
